Optimal. Leaf size=192 \[ -\frac {a (a+b \tan (c+d x))^{1+n}}{b^2 d (1+n) (2+n)}+\frac {\, _2F_1\left (1,1+n;2+n;\frac {a+b \tan (c+d x)}{a-i b}\right ) (a+b \tan (c+d x))^{1+n}}{2 (a-i b) d (1+n)}+\frac {\, _2F_1\left (1,1+n;2+n;\frac {a+b \tan (c+d x)}{a+i b}\right ) (a+b \tan (c+d x))^{1+n}}{2 (a+i b) d (1+n)}+\frac {\tan (c+d x) (a+b \tan (c+d x))^{1+n}}{b d (2+n)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.20, antiderivative size = 192, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 6, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3647, 3711, 12,
3620, 3618, 70} \begin {gather*} -\frac {a (a+b \tan (c+d x))^{n+1}}{b^2 d (n+1) (n+2)}+\frac {(a+b \tan (c+d x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {a+b \tan (c+d x)}{a-i b}\right )}{2 d (n+1) (a-i b)}+\frac {(a+b \tan (c+d x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {a+b \tan (c+d x)}{a+i b}\right )}{2 d (n+1) (a+i b)}+\frac {\tan (c+d x) (a+b \tan (c+d x))^{n+1}}{b d (n+2)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 70
Rule 3618
Rule 3620
Rule 3647
Rule 3711
Rubi steps
\begin {align*} \int \tan ^3(c+d x) (a+b \tan (c+d x))^n \, dx &=\frac {\tan (c+d x) (a+b \tan (c+d x))^{1+n}}{b d (2+n)}+\frac {\int (a+b \tan (c+d x))^n \left (-a-b (2+n) \tan (c+d x)-a \tan ^2(c+d x)\right ) \, dx}{b (2+n)}\\ &=-\frac {a (a+b \tan (c+d x))^{1+n}}{b^2 d (1+n) (2+n)}+\frac {\tan (c+d x) (a+b \tan (c+d x))^{1+n}}{b d (2+n)}-\frac {\int b (2+n) \tan (c+d x) (a+b \tan (c+d x))^n \, dx}{b (2+n)}\\ &=-\frac {a (a+b \tan (c+d x))^{1+n}}{b^2 d (1+n) (2+n)}+\frac {\tan (c+d x) (a+b \tan (c+d x))^{1+n}}{b d (2+n)}-\int \tan (c+d x) (a+b \tan (c+d x))^n \, dx\\ &=-\frac {a (a+b \tan (c+d x))^{1+n}}{b^2 d (1+n) (2+n)}+\frac {\tan (c+d x) (a+b \tan (c+d x))^{1+n}}{b d (2+n)}-\frac {1}{2} i \int (1-i \tan (c+d x)) (a+b \tan (c+d x))^n \, dx+\frac {1}{2} i \int (1+i \tan (c+d x)) (a+b \tan (c+d x))^n \, dx\\ &=-\frac {a (a+b \tan (c+d x))^{1+n}}{b^2 d (1+n) (2+n)}+\frac {\tan (c+d x) (a+b \tan (c+d x))^{1+n}}{b d (2+n)}-\frac {\text {Subst}\left (\int \frac {(a-i b x)^n}{-1+x} \, dx,x,i \tan (c+d x)\right )}{2 d}-\frac {\text {Subst}\left (\int \frac {(a+i b x)^n}{-1+x} \, dx,x,-i \tan (c+d x)\right )}{2 d}\\ &=-\frac {a (a+b \tan (c+d x))^{1+n}}{b^2 d (1+n) (2+n)}+\frac {\, _2F_1\left (1,1+n;2+n;\frac {a+b \tan (c+d x)}{a-i b}\right ) (a+b \tan (c+d x))^{1+n}}{2 (a-i b) d (1+n)}+\frac {\, _2F_1\left (1,1+n;2+n;\frac {a+b \tan (c+d x)}{a+i b}\right ) (a+b \tan (c+d x))^{1+n}}{2 (a+i b) d (1+n)}+\frac {\tan (c+d x) (a+b \tan (c+d x))^{1+n}}{b d (2+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.12, size = 135, normalized size = 0.70 \begin {gather*} \frac {(a+b \tan (c+d x))^{1+n} \left (\frac {\, _2F_1\left (1,1+n;2+n;\frac {a+b \tan (c+d x)}{a-i b}\right )}{(a-i b) (1+n)}+\frac {\, _2F_1\left (1,1+n;2+n;\frac {a+b \tan (c+d x)}{a+i b}\right )}{(a+i b) (1+n)}+\frac {2 \left (-\frac {a}{1+n}+b \tan (c+d x)\right )}{b^2 (2+n)}\right )}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.34, size = 0, normalized size = 0.00 \[\int \left (\tan ^{3}\left (d x +c \right )\right ) \left (a +b \tan \left (d x +c \right )\right )^{n}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \tan {\left (c + d x \right )}\right )^{n} \tan ^{3}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\mathrm {tan}\left (c+d\,x\right )}^3\,{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^n \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________